var msg = Components.classes["@lmind.org/message-pipe;1"].getService(Components.interfaces.nsIMessagePipe);
msg.addReceiver("xul", function(title, data){
	alert(title + "=" + data);
});

function send(action, data) {
	var message = {
		action : action,
		data : data
	}
	msg.send("python", JSON.stringify(message));
}

function pyThrow() {
	send('throw_exception', {})
}

function showMore() {
	document.getElementById("more-text").hidden = false;
	var data = {
		action : 'delay_notify'
	}
	msg.send("python", JSON.stringify(data));
}

function func1() {
	return 2;
}

function dbg() {
	debugger;
	showMore();
	var a = 1+1;
	var s = a + "hahaha"
	a = func1();
	return s;
}